﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Data;

namespace Tailord
{
    public partial class xrIrsaliye : DevExpress.XtraReports.UI.XtraReport
    {
        DataSet ds;
        int FaturaRowCount;
        public xrIrsaliye(DataSet ds)
        {
            InitializeComponent();

            this.ds = ds;

            xrSubIrsaliye subIrsaliye = (xrSubIrsaliye)SubIrsaliyeLines.ReportSource;
            subIrsaliye.fillTable(ds.Tables["Table1"]);

            this.DataMember = "Table";
            this.DataSource = ds;

            XRTable[] tbarray = new XRTable[] { tbFirma,tbTarih,tbVD };

            foreach (XRTable table in tbarray)
            {
                foreach (XRTableRow row in table.Rows)
                {
                    foreach (XRTableCell cell in row)
                    {
                        if (cell.Name.StartsWith("tc"))
                            cell.DataBindings.Add("Text", null, "Table." + cell.Name);
                    }
                }
            }

            
        }

        private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            this.DataMember = "Table";
            this.DataSource = ds;
        }

        
    }
}
